-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] subtree intercepts pointer events, Unable to click #13576
Comments
This is a serious problem,I hope it gets fixed first.. |
@rr13k I can repro with the following snippet on all recent versions - 1.21, 1.20, 1.19 & 1.18 // a.mjs
import { chromium } from '@playwright/test';
const browser = await chromium.launch({ headless: false });
const page = await browser.newPage();
await page.goto("https://element.eleme.io/#/zh-CN/component/radio",{waitUntil:'commit'})
await page.click('button:has-text("取消")');
await page.click("label[role=\"radio\"]:has-text(\"备选项2\") >> nth=0")
console.log('trying to click...');
await page.click(".demo-block.demo-zh-CN.demo-radio.hover .source div div label:nth-child(2) .el-radio__input .el-radio__original >> nth=0")
console.log('succeeded!!!');
await browser.close(); |
Is there any progress so far? |
@rr13k no progress, but you can work-around this with await page.locator('.demo-block.demo-zh-CN.demo-radio.hover .source div div label:nth-child(2) .el-radio__input .el-radio__original >> nth=0').dispatchEvent('click'); |
hi, i know You can toggle locations to click , but it codegen output ,It affects my work very much |
I have looked at this page, and there is a span that does overlay the target input and does indeed intercept pointer events. Relaxing the selector works totally fine - just click not on the input itself, but on the parent component. Here I removed await page.click(".demo-block.demo-zh-CN.demo-radio.hover .source div div label:nth-child(2) .el-radio__input >> nth=0") I don't think there is a bug to fix here. |
For anyone reading this, I solved this error in my case (trying to close a dropdown) by using |
This is an issue for me in Webkit running on an Ubuntu container in CircleCI The following workarounds do not work: locator.click({ force: true }) locator.dispatchEvent("click") With the workarounds the click event has no effect. Without the workarounds the click is intercepted as described in this issue. Inspecting the DOM in the trace file does not show any blocking elements. I am selecting the innermost icon element directly, and have tried selecting the wrapping anchor tag. Not reproducible in Firefox, or Chromium, or on my local machine, but is happening every time in my CI container. Playwright error message: waiting for selector "[href="http://playwright-org.lvh.me:3000/admin/team/2"]"
selector resolved to visible <a class="pjax" href="http://playwright-org.lvh.me:…>…</a>
attempting click action
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<div>…</div> intercepts pointer events Installing playwright directly onto my container with: npx playwright install --with-deps Webkit install output Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 0% 0.0s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 2% 0.5s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 6% 0.4s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 10% 0.4s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 15% 0.4s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 19% 0.3s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 23% 0.3s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 28% 0.3s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 30% 0.3s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 35% 0.3s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 40% 0.2s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 45% 0.2s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 51% 0.2s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 56% 0.2s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 59% 0.2s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 63% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 68% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 73% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 76% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 79% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 84% 0.1s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 87% 0.0s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 92% 0.0s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 97% 0.0s Downloading Webkit 15.4 (playwright build v1641) - 90.1 Mb [] 100% 0.0s
Webkit 15.4 (playwright build v1641) downloaded to /home/circleci/.cache/ms-playwright/webkit-1641 |
@PsiKai If you could share a repro that we can run locally, please file a new issue and we'll definitely look into it. |
@dgozman a repro is difficult, as the issue only appeared in CircleCI and not on my local machine. Could I share the trace file with you as a sufficient repro? |
@PsiKai Well, sharing the trace file is better than nothing, but no guarantees we'll be able to pinpoint the issue. Ideally, you would be able to repro locally, and then debug with our tools. |
omg have been 3 hours with this problem and this was the solution thank you! this is |
using force click, based on the configuration of the website subtree and sub events, it sometimes lead to unexpected events, example in my case where the website is based on custom built framework - this is resulting in unexpectedly closing the current tab instance in the browser EDIT - the issue is with our internal framework, my bad everybody, the force click works fine :) |
Context:
Code Snippet
Describe the bug
Add any other details about the problem here.
Pending operations:
very long DEBUG=pw:api log
The text was updated successfully, but these errors were encountered: